package org.wutopia.labcloud.domain.uaa;

import lombok.AllArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.wutopia.labcloud.domain.uaa.controller.vo.output.UserGetUserOutputVO;
import org.wutopia.labcloud.domain.uaa.service.UserService;

import java.util.Set;



@SpringBootTest(classes = UserAuthApplication.class)
public class MappingsTest {

//    @Autowired
//    private RequestMappingHandlerMapping handlerMapping;
    @Autowired
    private UserService userService;

//    @Test
//    public void getMappings() {
//        handlerMapping.getHandlerMethods().forEach((info, method) -> {
//            Set<String> patterns = info.getPatternsCondition().getPatterns();
//            patterns.forEach(System.out::println); // 输出如 "/user", "/login"
//        });
//    }

    @Test
    public void getUser() {

        UserGetUserOutputVO userById = userService.getUserById(1937873660979187713L);
        System.out.println(userById);
    }
}
